package cn.com.netedge.iot.frontend.comm.constants;

import io.netty.channel.Channel;
import io.netty.channel.socket.DatagramPacket;

import java.util.LinkedHashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicInteger;

public interface ChannelConstant {
    AtomicInteger CHANNEL_COUNT = new AtomicInteger(); //通道计数

    Map<String, Channel> CHANNEL_MAP = new ConcurrentHashMap<>(); //通道容器

    Map<String, Long> CHANNEL_CREATE_TIME_MAP = new LinkedHashMap<>();//新建通道时间记录， 用于判断新建连接后1分钟内未收到报文，该连接被自动剔除

    Map<String, DatagramPacket> DATAGRAM_PACKET_MAP = new ConcurrentHashMap<>(); //数据报容器

    Map<String, Long> SEND_FLAG_MAP = new ConcurrentHashMap<>(); //保证终端命令串行执行的标志
}
